package cn.itcast.mongo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Document("users")  //声明实体类相关的集合
public class User {
    @Id
    private Long id;
    private String name;
    private Integer age;
}